package com.boot.common;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

@WebListener
//@PropertySource("classpath:my.properties")
public class WebInitListener implements ServletContextListener {
//	@Autowired
//	private BizService	service;

	//	@Value("${image.save}")
	private String		imageSavePath;

	@Override
	public void contextDestroyed(ServletContextEvent arg0) {

	}

	@Override
	public void contextInitialized(ServletContextEvent event) {
		//		if (StringUtils.isNoneBlank(imageSavePath)) {
		//			File file = new File(imageSavePath);
		//			System.out.println("文件上传保存路径: " + imageSavePath);
		//			if (!file.exists()) {
		//				System.err.println("错误: my.properties中配置的文件上传保存路径不存在");
		//			} else {
		//			}
		//			event.getServletContext().setAttribute(Constant.APP_IMAGE_SAVE_PATH, file.getAbsolutePath());
		//		}
	}

}
